home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
076-100
/
disk_076
/
include
/
util.g
< prev
Wrap
Text File
|
1992-05-06
|
2KB
|
78 lines
type
/* result from the string comparison routine: */
COMPARISON = enum {
EQUAL,
LESS,
GREATER
};
/* error codes returned by 'IOerror': */
ushort
CH_OK = 0, /* no error */
CH_EOF = 1, /* read past end-of-file indicator */
CH_CLOSED = 2, /* use after close */
CH_NONEXIS = 3, /* file doesn't exist */
CH_DISKFULL = 4, /* disk is full; write failed */
CH_BADSEEK = 5, /* bad seek call */
CH_MISSING = 6, /* no data on line */
CH_BADCHAR = 7, /* bad character for input conversion */
CH_OVERFLOW = 8, /* overflow on numeric conversion */
CH_BADREAD = 9; /* the system read call failed! */
/* result from LineRead when we get end of file: */
ulong LINE_EOF = 0xffffffff;
extern
CharsLen(*char charsPtr)ulong,
CharsEqual(*char charsPtr1, charsPtr2)bool,
CharsCopy(*char dest, source)void,
CharsCmp(*char charsPtr1, charsPtr2)COMPARISON,
CharsConcat(*char dest, source)void,
CharsCopyN(*char dest, source; ulong n)void,
CharsIndex(*char subject, object)long,
exit(long status)void,
ConvTime(ulong seconds; *char buffer)void,
CurrentTime()ulong,
GetPar()*char,
RescanPars()void,
FileCreate(*char fileName)bool,
FileDestroy(*char fileName)bool,
FileRename(*char oldName, newName)bool,
RawRead(channel input binary chan; *byte buffer; ulong count)ulong,
RawWrite(channel output binary chan; *byte buffer; ulong count)ulong,
LineRead(channel input text chan; *char buffer; ulong count)ulong,
LineWrite(channel output text chan; *char buffer; ulong count)ulong,
RandomOut(channel output binary chan)void,
ReOpen(channel input binary ch1; channel output binary ch2)void,
SeekIn(channel input binary chan; ulong position)bool,
SeekOut(channel output binary chan; ulong position)bool,
TextAppend(channel output text chan)bool,
GetIn(channel input binary chan)ulong,
GetOut(channel output binary chan)ulong,
GetInMax(channel input binary chan)ulong,
GetOutMax(channel output binary chan)ulong,
FlushOut(channel output binary chan)void,
Malloc(ulong length)*byte,
Mfree(*byte region; ulong length)void,
MerrorSet(bool newFlag)void,
MerrorGet()bool,
BlockMove(*byte dest, source; ulong count)void,
BlockFill(*byte dest; ulong count; byte valu)void,
BlockMoveB(*byte dest, source; ulong count)void;